\(\int \cot (c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx\) [193]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 25 \[ \int \cot (c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \csc (c+d x)}{d}+\frac {a \log (\sin (c+d x))}{d} \]

[Out]

-a*csc(d*x+c)/d+a*ln(sin(d*x+c))/d

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2912, 12, 45} \[ \int \cot (c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \log (\sin (c+d x))}{d}-\frac {a \csc (c+d x)}{d} \]

[In]

Int[Cot[c + d*x]*Csc[c + d*x]*(a + a*Sin[c + d*x]),x]

[Out]

-((a*Csc[c + d*x])/d) + (a*Log[Sin[c + d*x]])/d

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2912

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {a^2 (a+x)}{x^2} \, dx,x,a \sin (c+d x)\right )}{a d} \\ & = \frac {a \text {Subst}\left (\int \frac {a+x}{x^2} \, dx,x,a \sin (c+d x)\right )}{d} \\ & = \frac {a \text {Subst}\left (\int \left (\frac {a}{x^2}+\frac {1}{x}\right ) \, dx,x,a \sin (c+d x)\right )}{d} \\ & = -\frac {a \csc (c+d x)}{d}+\frac {a \log (\sin (c+d x))}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.48 \[ \int \cot (c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \csc (c+d x)}{d}+\frac {a \log (\cos (c+d x))}{d}+\frac {a \log (\tan (c+d x))}{d} \]

[In]

Integrate[Cot[c + d*x]*Csc[c + d*x]*(a + a*Sin[c + d*x]),x]

[Out]

-((a*Csc[c + d*x])/d) + (a*Log[Cos[c + d*x]])/d + (a*Log[Tan[c + d*x]])/d

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84

method result size
derivativedivides \(-\frac {a \left (\csc \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )\right )\right )}{d}\) \(21\)
default \(-\frac {a \left (\csc \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )\right )\right )}{d}\) \(21\)
parallelrisch \(-\frac {a \left (-2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sec \left (\frac {d x}{2}+\frac {c}{2}\right ) \csc \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}\) \(53\)
risch \(-i a x -\frac {2 i a c}{d}-\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}+\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) \(61\)
norman \(\frac {-\frac {a}{2 d}-\frac {a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {a \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) \(105\)

[In]

int(cos(d*x+c)*csc(d*x+c)^2*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/d*a*(csc(d*x+c)+ln(csc(d*x+c)))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.32 \[ \int \cot (c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right ) - a}{d \sin \left (d x + c\right )} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

(a*log(1/2*sin(d*x + c))*sin(d*x + c) - a)/(d*sin(d*x + c))

Sympy [F]

\[ \int \cot (c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx=a \left (\int \cos {\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}\, dx + \int \sin {\left (c + d x \right )} \cos {\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}\, dx\right ) \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)**2*(a+a*sin(d*x+c)),x)

[Out]

a*(Integral(cos(c + d*x)*csc(c + d*x)**2, x) + Integral(sin(c + d*x)*cos(c + d*x)*csc(c + d*x)**2, x))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00 \[ \int \cot (c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \log \left (\sin \left (d x + c\right )\right ) - \frac {a}{\sin \left (d x + c\right )}}{d} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

(a*log(sin(d*x + c)) - a/sin(d*x + c))/d

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.04 \[ \int \cot (c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - \frac {a}{\sin \left (d x + c\right )}}{d} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

(a*log(abs(sin(d*x + c))) - a/sin(d*x + c))/d

Mupad [B] (verification not implemented)

Time = 9.02 (sec) , antiderivative size = 55, normalized size of antiderivative = 2.20 \[ \int \cot (c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )+2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )+\frac {1}{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2\,d} \]

[In]

int((cos(c + d*x)*(a + a*sin(c + d*x)))/sin(c + d*x)^2,x)

[Out]

-(a*(tan(c/2 + (d*x)/2) - 2*log(tan(c/2 + (d*x)/2)) + 2*log(tan(c/2 + (d*x)/2)^2 + 1) + 1/tan(c/2 + (d*x)/2)))
/(2*d)